<%@ Page Language="VB" MasterPageFile="~/site.master" AutoEventWireup="false" codefile="MatchScore.aspx.vb" Inherits="MatchScore" %>
<%@ Register TagPrefix="wu" TagName="FixtureList" Src="../FixtureList.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="server">
    <wu:FixtureList ID="FixtureList1" Runat="server" />
    <asp:sqldatasource id="SqlDataSource1" runat="server"
        selectcommand="SELECT [FixtureID], [GoalsFor], [GoalsAgainst], [Notes] FROM [Fixtures] WHERE ([FixtureID] = @FixtureID)"
        UpdateCommand="UPDATE [Fixtures] SET [GoalsFor] = @GoalsFor, [GoalsAgainst] = @GoalsAgainst, [Notes] = @Notes WHERE [FixtureID] = @FixtureID"
        connectionstring="<%$ ConnectionStrings:WroxUnited %>">
        <UpdateParameters>
            <asp:Parameter Type="Int16" Name="GoalsFor"></asp:Parameter>
            <asp:Parameter Type="Int16" Name="GoalsAgainst"></asp:Parameter>
            <asp:Parameter Type="String" Name="Notes"></asp:Parameter>
            <asp:Parameter Type="Int32" Name="FixtureID"></asp:Parameter>
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter Name="FixtureID" Type="Int32" ControlID="FixtureList1" PropertyName="SelectedValue"></asp:ControlParameter>
        </SelectParameters>
    </asp:sqldatasource>
    <asp:detailsview id="DetailsView1" runat="server" datasourceid="SqlDataSource1" autogeneraterows="False"
        datakeynames="FixtureID">
        <Fields>
            <asp:BoundField ReadOnly="True" HeaderText="FixtureID" InsertVisible="False" DataField="FixtureID" SortExpression="FixtureID" Visible="False"></asp:BoundField>
            <asp:BoundField HeaderText="Goals For" DataField="GoalsFor" SortExpression="GoalsFor"></asp:BoundField>
            <asp:BoundField HeaderText="Goals Against" DataField="GoalsAgainst" SortExpression="GoalsAgainst"></asp:BoundField>
            <asp:TemplateField SortExpression="Notes" HeaderText="Notes">
                <EditItemTemplate>
                    <asp:TextBox id=TextBox1 runat="server" Text='<%# Bind("Notes") %>' TextMode="MultiLine" Rows="10" Columns="50"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label runat="server" Text='<%# Bind("Notes") %>' id="Label1"></asp:Label>
                </ItemTemplate>
                </asp:TemplateField>
            <asp:CommandField ShowEditButton="True"></asp:CommandField>
        </Fields>
    </asp:detailsview>

</asp:Content>
